package com.wc.算法提高课.E第五章_数学知识.筛质数.哥德巴赫猜想;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/10/3 11:13
 * @description https://www.acwing.com/problem/content/1294/
 */
public class Main {
    /**
     * 思路：
     * 欧拉筛的板子
     */
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int N = 1000010, cnt = 0;
    static int[] primes = new int[N / 10];
    static boolean[] st = new boolean[N];
    static int n;

    public static void main(String[] args) {
        ola();
        while ((n = sc.nextInt()) != 0) {
            int a = 0, b = 0;
            for (int i = 1; i <= cnt; i++) {
                a = primes[i];
                b = n - a;
                if (!st[b]) break;
            }
            out.printf("%d = %d + %d\n", n, a, b);
        }
        out.flush();
    }


    static void ola() {
        st[0] = st[1] = false;
        for (int i = 2; i < N; i++) {
            if (!st[i]) primes[++cnt] = i;
            for (int j = 1; i * primes[j] < N; j++) {
                st[i * primes[j]] = true;
                if (i % primes[j] == 0) break;
            }
        }
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}
